import os
from talking_dataset.generate_video import generate_video_by_image
import math


def generate_dataset(input_path, generate_output_path):
    """

    :param generate_output_path:
    :param input_path:  目录
    :return:
    """
    for root_root, root_dirs, root_files in os.walk(input_path):
        dir_num = 0
        for dir_name in root_dirs:
            dir_num = dir_num + 1
            for c_root, c_dirs, c_files in os.walk(os.path.join(root_root, dir_name)):
                # 获取文件路径
                print(dir_name)
                generate_video_by_image(generate_output_path, dir_num, c_root, c_files)


if __name__ == "__main__":
    generate_dataset(r"D:\dataset\talking_dataset", r"D:\dataset\talking_dataset_video")
